package edu.mit.compilers.assembly.x64.codes;

import edu.mit.compilers.assembly.x64.basic.X64Operand;

public class X64PushCode extends X64Code {
    private X64Operand src;
    public X64PushCode(X64Operand src) {
        assert !src.isMemoryOperand() : "src can not be memory location in push code, which is " + src.getAddress();
        this.src = src;
    }

    @Override
    protected String getStringFroShow(String prefix, boolean debug) {
        assert prefix != null;
        return prefix + "pushq" + TAB + src.getAddress() + '\n';
    }
}
